<div class="squareContent">
    <table class="squareBoard" width="100%" cellspacing="0" cellpadding="5">
        <thead>
            <tr class="squareBoardTitle">
                <td class="subjectTitle">主题</td>
                <td class="releaseTimeTitle">发布时间</td>
                <td class="releasePersonTitle">发表人</td>
            </tr>
        </thead>
        <tbody>
            <% for post in @posts %>
                <tr>
                    <td>
                        <% if @params[:subClassID].nil? %>
                        <%= post.squareClass.name %>
                        <% end %>
                        <%= link_to post.title,:action=>"post",:id=>post.id %>
                    </td>
                    <td class="dateTime"><%= post.postDatetime.strftime("%Y-%m-%d %I:%M %p") %></td>
                    <td><%= link_to post.poster.username,:controller=>"home",:action=>"index",:id=>post.poster.id %></td>
                </tr>
            <% end %>
        </tbody>
    </table>
    <div class="pager">
        <ul>
            <% for page in @post_pages %>
                <%=
                if page==@post_pages.current()
                    "<li class='currentPage'>#{page.number}</li>"
                else
                    "<li><a href = '#{@params[:id]}?page=#{page.number}' >#{page.number}</a></li>"
                end
                %>
            <% end %>
        </ul>
    </div>
</div>